<?php

$foo=$_GET["updateid"];

include("mysql_conn.php");
include("settings.php");

$result=mysql_query("select updateid,projectid,updatetext,date(updatetime),date_format(updatedate,'%m/%d/%Y') as updatedate from updates where updateid='$foo'");

while($row=mysql_fetch_array($result))
{
 $updatetime=$row['date(updatetime)'];
 $updatetext=$row['updatetext'];
 $projectid=$row['projectid'];
 $updatedate=$row['updatedate'];
}

echo "<html><head><title>$site_title: Edit Update</title>
<link rel='stylesheet' type='text/css' href='style.css'>
</head><body>
<h3>Are you sure you want to delete this update?</h3>
<form action='deleteupdate-do.php' method='post'>
<table width=80%>
<tr><th width=9%>Task Date</th>
<th>Update</th></tr>
<tr><td><input type='hidden' name='updateid' value='$foo'>
<input type='hidden' name='projectid' value='$projectid'>$updatedate</td>
<td>$updatetext</td></tr>
</table>
<input type='submit' value='Apply'>";

mysql_close($con)
?>
